USE [temp_frame]
GO

/****** Object:  Table [dbo].[baseUser]    Script Date: 07/03/2012 18:25:31 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[baseUser](
	[id] [bigint] IDENTITY(1,1) NOT NULL,
	[username] [varchar](50) NULL,
	[password] [varchar](50) NULL,
	[baseperson] [bigint] NULL,
	[baseRole] [bigint] NULL,
	[lineno] [int] NULL,
	[type] [int] NULL,
	[isactive] [int] NULL,
	[descr] [ntext] NULL,
	[xmlpower] [text] NULL,
	[createdat] [datetime] NULL,
	[createdby] [bigint] NULL,
	[updatedat] [datetime] NULL,
	[updatedby] [bigint] NULL,
	[ip] [varchar](30) NULL,
	[jcorgs] [text] NULL,
 CONSTRAINT [PK_baseUser] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'username'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'password'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员（与人员表的id关联）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'baseperson'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'baseRole'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排列序号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'lineno'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'type'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用（0为：停用；1为：启用）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'isactive'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户权限xml' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'xmlpower'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'createdat'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'createdby'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'updatedat'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新人编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'updatedby'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后操作人员的ip地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'baseUser', @level2type=N'COLUMN',@level2name=N'ip'
GO

ALTER TABLE [dbo].[baseUser] ADD  CONSTRAINT [DF_baseUser_isactive]  DEFAULT (1) FOR [isactive]
GO

